<?php defined('SYSPATH') or die('No direct script access.');

class Route extends Kohana_Route {
    
    /**
	 * Generates a URI for the current route based on the parameters given.
	 *
	 *     // Using the "default" route: "users/profile/10"
	 *     $route->uri(array(
	 *         'controller' => 'users',
	 *         'action'     => 'profile',
	 *         'id'         => '10'
	 *     ));
	 *
	 * @param   array   URI parameters
	 * @return  string
	 * @throws  Kohana_Exception
	 * @uses    Route::REGEX_Key
	 */
	public function uri(array $params = NULL)
	{
            if ($params == null || !isset($params['language'])) {
                $params['language'] = Request::initial()->param('language');
            }
            
            return parent::uri($params);
        }
    
}